﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Huirui.Cavan.Domain.MainBoundedContext.ReportModule;
using Spring.Data.Generic;

namespace Huirui.Cavan.Infrastructure.Data.MainBoundedContext.PurchaseModule
{
    public class UnPayAndPayReportMapper : IRowMapper<UnPayAndPayReport>
    {
        #region IRowMapper 成员

        public UnPayAndPayReport MapRow(System.Data.IDataReader reader, int rowNum)
        {
            UnPayAndPayReport report = new UnPayAndPayReport();
            report.SupplierCode = reader.GetString(0);
            report.SupplierName = reader.GetString(1);
            report.UnPayOrPayCode = reader.GetString(2);
            report.UnPayOrPayDate = reader.GetDateTime(3);
            report.Currency = reader.GetString(4);
            report.CurrencyRate = reader.GetDecimal(5);
            report.FinalAmount = reader.GetDecimal(6);
            report.LeftAmount = reader.GetDecimal(7);
            report.Amount = reader.GetDecimal(8);
            report.BusinessType = reader.GetInt32(9);

            return report;
        }

        #endregion
    }
}
